<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			*{
				margin: 0;
				padding: 0;
			}
			#wrap .inner:nth-child(1){
				border: 1px solid;
			}
			/*#wrap .inner:nth-of-type(1){
				border: 1px solid;
			}*/
			
			/*#wrap div:nth-of-type(1){
				border: 1px solid;
			}
			#wrap p:nth-of-type(1){
				border: 1px solid;
			}
			#wrap span:nth-of-type(1){
				border: 1px solid;
			}
			#wrap h1:nth-of-type(1){
				border: 1px solid;
			}
			#wrap h2:nth-of-type(1){
				border: 1px solid;
			}*/
			
			/*nth-of-type以元素为中心*/
		</style>
	</head>
	<body>
		<div id="wrap">
			<div class="inner">div</div>
			<p class="inner">p</p>
			<span class="inner">span</span>
			<h1 class="inner">h1</h1>
			<h2 class="inner">h2</h2>
		</div>
	</body>
</html>
